using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace DataPopulation
{
    public partial class StatsDlg : Form
    {
        private string connStr;

        private StatsDlg()
        {
            InitializeComponent();
        }

        public StatsDlg(string connectionStr)
        {
            InitializeComponent();

            connStr = connectionStr;
        }

        private void StatsDlg_Load(object sender, EventArgs e)
        {
            try
            {
                Cursor = Cursors.WaitCursor;

                dgStats.DataSource = DBUtils.GetStats(connStr);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                Close();
            }
            finally
            {
                Cursor = Cursors.Default;
            }
        }
    }
}